<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/5/23
 * Time: 16:08
 */

namespace app\api\Model;


class User extends BaseModel
{
    protected $hidden = ['password','create_time','update_time','state','invite_id'];

    public function getPicAttr($value, $data)
    {
        return $this->prefixImgUrl($value,$data);
    }

    public function check_phone($phone)
    {
        return $this->where('mobile',$phone)->limit(1)->find();
    }

    public function erjiUser($id){
        return $this->where('invite_id',$id)->select();
    }

    public function sanjiUser($id){
        return $this->where('invite_id',$id)->select();
    }


}